package com.dailyblue.project.estate.controller;

import com.dailyblue.project.estate.service.HarryService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Flux;

/**
 * @Auther:Liu
 * @Testname:HarryController
 * @Date:2025/9/26 11:00
 */
@CrossOrigin
@RestController
@RequestMapping("/ollama_ai")
public class HarryController {
    @Resource
    private HarryService harryService;

    /**
     * 用户请求数据方法
     * @param question
     * @param userId
     * @return
     */
    @RequestMapping
    Flux<String> b(@RequestParam("question") String question, @RequestParam("userId") String userId) {
        return harryService.getMessage(question, userId);
    }
}
